package com.banggood.upms.bean.vo.search;

import com.banggood.upms.bean.vo.validation.SearchGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.Min;

/**
 * @author XuChuangFeng
 */
@Data
@ApiModel(value = "搜索条件", description = "负责接收封装调用者传入的基础参数")
public class BaseSearchCriteria {

    @ApiModelProperty(value = "页码")
    @Min(value = 1, message = "页码必须大于或等于1！", groups = SearchGroup.class)
    private int pageNum = 1;

    @ApiModelProperty(value = "行数")
    @Min(value = 5, message = "单页最少显示五条记录！", groups = SearchGroup.class)
    private int rows = 10;

    @ApiModelProperty(value = "创建时间起始", hidden = true)
    //@Past(message = "创建时间必须在当前时间之前！", groups = {SearchGroup.class})
    private String creationStartTime;

    @ApiModelProperty(value = "创建时间结束", hidden = true)
    private String creationEndTime;

    @ApiModelProperty(value = "调用者的用户ID", hidden = true)
    private String requesterId;
}
